Get Post
GET /post/:postId
Description
Fetches a single post by its MongoDB post ID. The response respects the post owner's visibility rules because it is built through the same visibility pipeline used elsewhere in the API.
Request Parameters
Requires Authentication: true
PATH PARAMS
| Name | Type | Required | Description |
|---|---|---|---|
postId | string | Yes | MongoDB post ID. |
Usage Example
await axios.get("https://api.daykeeper.app/post/66cbbea31e854f3d7995c1f0", {
headers: {
Authorization: `Bearer ${accessToken}`,
},
})
Success Response
{
"message": "post fetched successfully",
"data": {
"_id": "66cbbea31e854f3d7995c1f0",
"data": "My first post here",
"privacy": "public",
"status": "public"
}
}